package com.woniu.his.sms.client;

import com.woniu.his.result.Result;
import com.woniu.his.sms.client.param.AddDeptParam;
import com.woniu.his.sms.client.param.UpdateDeptParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "SmsDeptManageClient",name="sms",path = "sms")
public interface SmsDeptManageClient {

    /**
     * 新增科室
     *
     * @param param 参数
     * @return {@link Result}
     */
    @PostMapping("/addDept")
    public Result addDept(@RequestBody AddDeptParam param);


    /**
     * 添加科室类型
     *
     * @param deptTypeName 部门类型名称
     * @return {@link Result}
     */
    @GetMapping("/addDeptType")
    public Result addDeptType(@RequestParam("deptTypeName") String deptTypeName);

    /**
     * 根据ids删除科室
     *
     * @param ids id
     * @return {@link Result}
     */
    @GetMapping("/deleteDeptByIds")
    public Result deleteDeptByIds(@RequestParam("ids") List<Integer> ids);

    /**
     * 更新科室通过id
     *
     * @param param 参数
     * @return {@link Result}
     */
    @PostMapping("/updateDeptById")
    public Result updateDeptById(@RequestBody UpdateDeptParam param);

}
